package me.zhengjie.modules.app.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
import me.zhengjie.modules.app.domain.GameConfig;
import me.zhengjie.modules.app.domain.dto.GameConfigDto;
import me.zhengjie.modules.app.mapper.GameConfigMapper;
import me.zhengjie.modules.app.service.GameConfigService;
import org.springframework.stereotype.Service;

import java.util.Date;

/**
* @author xz
* @date 2025/06/23
*/
@Slf4j
@Service
public class GameConfigServiceImpl extends ServiceImpl<GameConfigMapper, GameConfig> implements GameConfigService {

    /**
     * 新增记录
     * @param dataModel
     * @return
     */
    @Override
    public int insertData(GameConfig dataModel){
        Date insertDate=new Date();
        dataModel.setCreateTime(insertDate);
        dataModel.setUpdateTime(insertDate);
        return getBaseMapper().insert(dataModel);
    }

    @Override
    public GameConfigDto queryLimit1() {
        return getBaseMapper().queryLimit1();
    }
}
